password=input('请输入密码：')
safe=0
safe_sym=0
safe_len=0
safe_cap=0
safe_char=0
safe_num=0
symbols = r'''`!@#$%^&*()_+-=/*{}[]\|'";:/?,.<>'''
chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
number='0123456789'
for each in password:
    if each in chars:
        safe_char =1
for each in password:
    if each in number:
        safe_num =1
for each in password:
    if each in symbols:
        safe_sym =1
if len(password) <=8:
    safe_len =1
elif 16>len(password)>8:
    safe_len=2
else:
    safe_len=3
if password[0] in chars:
    safe_cap=1
print(safe_cap,safe_len,safe_sym,safe_char,safe_num)

if (safe_num==1 or safe_char==1) and safe_len==1:
    safe=1
elif ((safe_num==1 and safe_char==1) or (safe_num==1 and safe_sym==1) or (safe_char==1 and safe_sym==1)) and safe_len==2:
    safe=2
elif safe_num==1 and safe_char==1 and safe_num==1 and safe_len==3 and safe_cap==1:
    safe=3
else:
    safe=4
print(safe)

